package com.orm.handler;

import java.sql.*;

public class IntegerTypeHandler extends BaseTypeHandler<Integer> {
	
	@Override
	public void setNotNullParameter(PreparedStatement ps, int i, Integer parameter, JDBCType jdbcType) throws SQLException {
		ps.setInt(i, parameter);
	}
	
	@Override
	public Integer getNullableResult(ResultSet rs, String columnName) throws SQLException {
		return rs.getInt(columnName);
	}
	
	@Override
	public Integer getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
		return rs.getInt(columnIndex);
	}
}
